﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Languages;

namespace PTUDW_CNTN2010_F_CDT.Models
{
    public class UploadModel
    {
        [Required(ErrorMessageResourceName="ProductNameRequired", ErrorMessageResourceType = typeof(Resources))]
        [Display(Name = "ProductName", ResourceType = typeof(Resources))]
        public string ProductName { get; set; }

        [Required(ErrorMessageResourceName = "CategoryRequired", ErrorMessageResourceType = typeof(Resources))]
        [Display(Name = "Category", ResourceType = typeof(Resources))]
        public int CategoryId { get; set; }

        [Required(ErrorMessageResourceName = "PriceRequired", ErrorMessageResourceType = typeof(Resources))]
        [Display(Name = "Price", ResourceType = typeof(Resources))]
        public float Price { get; set; }

        [Required(ErrorMessageResourceName = "SizeRequired", ErrorMessageResourceType = typeof(Resources))]
        [Display(Name = "Size", ResourceType = typeof(Resources))]
        public string Size { get; set; }

        [Required(ErrorMessageResourceName = "WeightRequired", ErrorMessageResourceType = typeof(Resources))]
        [Display(Name = "Weight", ResourceType = typeof(Resources))]
        public string Weight { get; set; }

        [Required(ErrorMessageResourceName = "AmountRequired", ErrorMessageResourceType = typeof(Resources))]
        [Display(Name = "Amount", ResourceType = typeof(Resources))]
        public int Amount { get; set; }

        [Required(ErrorMessageResourceName = "WarrantyRequired", ErrorMessageResourceType = typeof(Resources))]
        [Display(Name = "Warranty", ResourceType = typeof(Resources))]
        public int Warranty { get; set; }

        [Display(Name = "Description", ResourceType = typeof(Resources))]
        public string Desciption { get; set; }

        public virtual Category Category { get; set; }
    }
}